package com.cee.quartz.job;

import com.cee.enums.BaseEnum;
import com.cee.util.EnumUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;



public enum JobType implements BaseEnum<String> {

    LOCAL("LOCAL", "Local"), HTTP("HTTP", "HTTP");

    private String code;
    private String text;

    private JobType(String code, String text) {
        this.code = code;
        this.text = text;
    }

    @Override
    public String getCode() {
        return code;
    }

    @JsonValue
    @Override
    public String getText() {
        return text;
    }

    @JsonCreator
    public static JobType createEnum(String code) {
        return EnumUtil.getEnumByCode(JobType.class, code);
    }

}
